home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Utilitaires System / caretPatch / caretPatch Read me! < prev   
Text File  |  1995-04-19  |  4KB  |  56 lines

  1. caretPatch
  2. ----------
  3.  
  4. System Extension, Version 0.2
  5. April 19, 1995, by Markus Frischknecht (frischknecht@esh.unibe.ch)
  6.  
  7. Written with Think C 7.0.3
  8.  
  9. This is Freeware. Keep the program if you think it's useful. I retain the copyright.
  10.  
  11. What is it?
  12. -----------
  13. Ever lost sight of the little caret, the thin blinking vertical line used to indicate where the next character you type in is going to show up on the screen? If so, you might have experimented with the blinking rate to make it more conspicuous. If that is not enough for you, this little system extension could be helpful. It draws the caret with a line two pixels thick instead of only one pixel.
  14. This System Extension might be useful for PowerBook owners. There are a few utilities that change the shape of the mouse pointer when it is over a text field (insertion beam, a vertical line with two little horizontal bars, one at the top, one at the bottom) to something more conspicuous. But they did not address the problem with the thin caret, therefore I decided to write my own little INIT... 
  15.  
  16. "It doesn't work in the program I use!"
  17. ---------------------------------------
  18. In any given program, the effect of caretPatch works as it should only under two conditions:
  19. 1. The program uses TextEdit fields for editing in dialog boxes, windows and so on.
  20. 2. The program itself does not install a custom drawing routine for the caret.
  21. Usually, the caret drawing routine is set to zero in any new TextEdit field, and the system will then draw the caret from within TEIdle; this is where this extension can insert itself. If the program uses a drawing routine of its own, the patch's inserted address pointing to its drawing routine is overwritten. Word processors (as e.g. WordPerfect, NisusWriter, Microsoft Word) use their own code for caret drawing and will not be affected by caretPatch in their text windows (but it will work in many dialogs). If this is disappointing for you, suggest a feature like thicker carets to the company that produces the word processor. As I have discovered in the demo version of NisusWriter 4.0, it can be done: NisusWriter offers a choice between thin and thick carets (and insertion beams, too) in its Editing preferences. Now that is what I call customer friendliness...
  22.  
  23. How is it done?
  24. ---------------
  25. The extension inserts the patch in the TENew trap; when TENew is entered the patch calls the original routine, then writes the address of its new caret drawing routine into the field "caretHook" of the TextEdit record. The drawing routine simply looks for the caret to be drawn, adds one pixel to the width of it, then inverts the caret. Since the routine to invert an area, InvertRect(), was designed to work with simple 1-bit images, the result in colour mode might not be overwhelming. Specifically, although it certainly works with colours, the resulting caret colour is unpredictable if indexed colours are used (because the index is inverted, not the colour value; see New Inside Macintosh: Imaging with QuickDraw).
  26.  
  27. Compatibility:
  28. --------------
  29. Tested on a SE30 under System  7.0.1, a Mac II, Mac IIci and a Macintosh Quadra 840AV under System 7.1; this obviously does not represent very extensive testing, so use at your own risk. Theoretically, it should work on System 4.1 and newer, as long as TextEdit exists (maybe TEStyleNew too?). It has *NOT* been tested under System 7.5 (nor 7.5.1), so be careful and have alternative boot disk ready; usually though, in case a system crash happens, it should be enough to reboot with the shift key pressed down (no System Extensions etc are loaded), to move caretPatch from the Extension folder into the trash, and to reboot again.
  30.  
  31. Disclaimer:
  32. -----------
  33. The author can take no responsibility for damages caused by this system extension. Use at your own risk!
  34.  
  35. Plans:
  36. -----
  37. - also for styled text edit fields (i.e. TEStyleNew())
  38. - user interface with a cdev: set thickness of caret, maybe different shapes like L, or something similar to the insertion beam
  39. - colours...
  40.  
  41. Credits:
  42. -------
  43. ShowIcon7 code by James W. Walker (walkerj@math.scarolina.edu), based on earlier versions by Patrick C. Beard, Paul Mercer, Darin Adler, Paul Snively, and Steve Capps.
  44. Parts of the code are Copyright by Symantec.
  45.  
  46. If you encounter problems, have questions or suggestions, let me know.
  47.  
  48. My address:
  49. Markus Frischknecht
  50. University of Berne
  51. Wohlenstrasse 50a
  52. CH-3032 Hinterkappelen
  53. Switzerland
  54.  
  55. Email: frischknecht@esh.unibe.ch
  56.